<template>
	<view>
		<view class="img">
			<image src="../../static/images/verify_success.png" mode="" v-if="flag"></image>
			<image src="../../static/images/verify_error.png" mode="" v-else></image>
		</view>
		<view class="status">
			<text v-if="flag">核销成功</text>
			<text v-else>核销失败</text>
		</view>
	</view>
</template>

<script>
	import { getVerify } from '../../api/serviceApi.js'
	export default {
		data() {
			return {
				option: {},
				flag: false
			}
		},
		onLoad(option) {
			this.option = option
			this._getVerify()
		},
		methods: {
			async _getVerify() {
				let data = {id: this.option.id, address: this.option.address}
				const res = await getVerify(data)
				console.log(res)
				this.flag = true
				uni.showToast({title: "核销成功",icon: 'none'})
			}
			
		}
	}
</script>

<style lang="scss" scoped>
	.img {
		padding-top: 200rpx;
		text-align: center;
		image {
			width: 200rpx;
			height: 200rpx;
		}
	}
	.status {
		text-align: center;
		font-size: 50rpx;
		color: #2f3030;
	}
</style>
